package com.yx.china.controller;
import com.yx.china.project.entities.ResponseResult;
import com.yx.china.service.StorageService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;

@RestController
public class StorageController {

    @Resource
    private StorageService storageService;

    @RequestMapping("/storage/decrease")
    public ResponseResult decrease(Long productId, Integer count){
        storageService.decrease(productId,count);
        return new ResponseResult(200,"扣减库存成功");
    }
}